<template>
  <div id="nav">
    <div class="nav-bar-wrap">
      <div class="nav-banner">
        <NavLeft />
        <div class="m"></div>
        <NavRight />
      </div>
      <div class="cpt-tab">
        <div class="tab-wrap">
          <router-link to="/home" tag="span">首页</router-link>
          <router-link to="/choose" tag="span">选车</router-link>
          <span>车友圈</span>
          <span>小视频</span>
          <span>排行榜</span>
          <span>服务</span>
          <span>文章</span>
          <span>视频</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import NavLeft from '@/components/Nav/NavLeft'
import NavRight from '@/components/Nav/NavRight'
export default {
  components: {
    NavLeft,
    NavRight
  }
}
</script>

<style lang="scss" scope>
.nav-bar-wrap {
  background: #333333;
  height: 1.92rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  .nav-banner {
    .m {
      position: relative;
      margin: 0px 8px;
      flex-grow: 1;
    }
    align-items: center;
    display: flex;
    height: 0.9rem;
    box-sizing: border-box;
    border-bottom: 1px solid #fff;
    padding: 0 0.2rem;
  }
  .cpt-tab {
    height: 0.96rem;
    line-height: 0.96rem;
    transform: translateZ(0);
    overflow: hidden;
    .tab-wrap {
      width: auto;
      height: 1.1rem;
      overflow-x: scroll;
      span {
        margin: 0 0.24rem;
        font-size: 0.32rem;
        color: #fff;
        padding-bottom: 0.1rem;
      }
      .router-link-active {
        border-bottom: 0.06rem solid #ffcd32;
        left: 50%;
        right: 0;
        content: '';
        height: 0.02rem;
        bottom: 0.16rem;
        width: 0.6rem;
      }
    }
  }
}
</style>
